import request from '@/utils/request'

export const listindex = (search) => 
    request({
        url: '/indexs',
        method: 'get',
        params: {
            pageNum: search.pageNum,
            pageSize:search.pageSize,
            queryString:search.queryString
        }
    }) 

export const removeindex = (id) => 
    request({
        url: '/indexs/' + id,
        method: 'delete'
    })

export const updateindex = (id, index) =>
    request({
        url: '/indexs/' + id,
        method: 'put',
        data: index
    })

export const saveindex = (index) => 
    request({
        url: '/indexs',
        method: 'post',
        data: index
    })